<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>项目</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="icon" href="./img/wy.ico" />
		<link rel="shortcut icon" href="./img/wy.ico" />
		<link rel="bookmark" type="image/x-icon" href="./img/wy.ico" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="static/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="css/answerCardPublic.css" />
		<style type="text/css">

		</style>
	</head>

	<body>
		<div class="main">
			<!--标题信息-->
			<div class="row top">
				<div class="col-md-9  col-xs-9 ">
					<h2>
			</h2>

				</div>
				<div class="col-md-2 col-xs-2 userInfo">
					<span>
				<img src="img/14.png"/>
					用户名称
				</span></div>
				<div class="col-md-1 col-xs-1 exit">
					<span>
				<img src="img/15.png" alt="" />
				退出
			</span></div>
			</div>
			<!--内容-->
			<div class="content">
				<div class="conBox">
					<div class="create">
						<img src="img/0-1.png" alt="" />
						<p>新建答题卡</p>
					</div>
					<div class="template">
						<img src="img/0-2.png" alt="" />
						<p>答题卡模板</p>
					</div>
				</div>
			</div>
		</div>

		<!--新建弹窗-->
		<div class="dialog">
			<div class="answer-box">
				<p class="title">新建答题卡<span class="close-icon"></span></p>
				<div class="answer-main">
					<ul>
						<li class="children-s">
							<div><span>纸张：</span>
								<select name="" class="pageType">
									<option value="a3">A3</option>
									<option value="a4">A4</option>
									<option value="b4">B4</option>
									<option value="b5">B5</option>
								</select>
							</div>
							<div><span>页数：</span>
								<select name="" value="2" class="pageNum">
									<option value="1">1</option>
									<option value="2" selected="selected">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
								</select>
							</div>
							<div><span>栏数：</span>
								<select name="" class="pageSubfield">
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
								</select>
							</div>
						</li>
						<li class="children-s">
							<div><span>颜色：</span>
								<select name="" class="colorType">
									<option value="red">红色</option>
									<option value="balck">黑色</option>
								</select>
							</div>
							<div><span>考号样式：</span>
								<select name="" class="idStyle">
									<option value="1">条码</option>
									<option value="2">填涂</option>

								</select>
							</div>
							<div><span>考号长度：</span><input type="text" style="width:60px;" class="idLength"></div>
						</li>
						<li class="check-li children-s">
							<div>
								<label for="slideLine">侧边密封线</label>
								<input type="checkbox" name="" id="slideLine">
							</div>
							<div>
								<label for="handinput">手写分数框</label>
								<input type="checkbox" name="" id="handinput">
							</div>
						</li>
						<li class="children-one">
							<span>标题：     &nbsp;&nbsp;</span><input type="text" class="sheetTitleVal">
						</li>
						<li class="children-one">
							<span>副标题：</span><input type="text" class="subTitle">
						</li>
					</ul>
				</div>

				<div class="btn-box">
					<input class="save" type="button" value="保存" id="save">
					<input class="cancel" type="button" value="取消" class="cancel">
				</div>

			</div>
		</div>
	</body>
	<script src="static/ckeditor/ckeditor.js" type="text/javascript" charset="utf-8"></script>
	<script src="static/lib/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function() {
			$('.cancel').on('click', function() {
				$('.dialog').fadeOut()
			})
			$('.create').on('click', function() {
				$('.dialog').show()
			})
			$('#save').on('click', function() {
				var obj = {};
				obj.pageType = $('.pageType').val(); //纸张类型
				obj.pageNum = $('.pageNum').val(); //页数
				obj.pageSubfield = $('.pageSubfield').val(); //分栏
				obj.colorType = $('.colorType').val(); //颜色
				obj.idStyle = $('.idStyle').val(); //考号样式
				obj.idLength = $('.idLength').val(); //考号长度
				obj.slideLine = $('#slideLine').prop('checked'); //侧边密封线
				obj.handinput = $('#handinput').prop('checked'); //手写分数框
				obj.sheetTitleVal = $('.sheetTitleVal').val(); //标题
				obj.subTitle = $('.subTitle').val(); //副标题
				if(obj.idLength > 0 && obj.idLength <= 18) {

				} else {
					alert('考号长度只可设为大于0小于18位数字')
					return
				}
				if(obj.pageType && obj.pageNum && obj.pageSubfield && obj.colorType && obj.idStyle && obj.idLength && obj.sheetTitleVal && obj.subTitle) {

					location.href = './sheet.html?pageType=' + obj.pageType + '&pageNum=' + obj.pageNum + '&pageSubfield=' + obj.pageSubfield + '&colorType=' + obj.colorType + '&idStyle=' + obj.idStyle + '&idLength=' + obj.idLength + '&slideLine=' + obj.slideLine + '&handinput=' + obj.handinput + '&sheetTitleVal=' + obj.sheetTitleVal + '&subTitle=' + obj.subTitle;
				} else {
					alert('数据未填写完成，不可创建模板')
				}

			})
		})
	</script>

</html>